import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login.vue')
  },

  {
    path: '/',
    name: 'select-room',
    component: () => import('../views/select-room.vue')
  },

  // 活动 等级
  {
    path: '/activity-ranking/:contestId/:contestName',
    name: 'Activity-1',
    component: () => import('../views/activity-ranking.vue')
  },

  // 等级 详情
  {
    path: '/gradeDetail/:contestId/:contestName/:judgeName/:money',
    name: 'GradeDetail',
    component: () => import('../views/gradeDetail.vue')
  },

  // 羊 详情
  {
    path: '/sheepDetail/:contestId/:rfid',
    name: 'SheepDetail',
    component: () => import('../views/sheepDetail.vue')
  },

  // 选手 随机分配羊
  {
    path: '/random-allocation-sheep',
    name: 'PersonSort',
    component: () => import('../views/random-allocation-sheep.vue')
  },

  // 选手 排名
  {
    path: '/person-sort/:contestId',
    name: 'PersonSort',
    component: () => import('../views/personSort.vue')
  },

  // 选手 详情
  {
    path: '/personDetail/:contestId/:personId',
    name: 'PersonDetail',
    component: () => import('../views/personDetail.vue')
  },

  // websocket 羊 
  {
    path: '/sheep-score/:roomId/:contestId/:contestName',
    name: 'SheepScore',
    component: () => import('../views/sheepScore.vue')
  },

  // 羊 排名 
  {
    path: '/sheep-sort/:contestId/:contestName/:rfid',
    name: 'SheepSort',
    component: () => import('../views/sheepSort.vue')
  },

  //  成年羊 育成羊 全部 排名 
  {
    path: '/all-sort1/:contestId/:contestName',
    name: 'AllSort1',
    component: () => import('../views/all-sort1.vue')
  }
]

const router = new VueRouter({
  // mode: 'hash',
  routes
})

export default router
